package com.longfor.dragonshard.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

/**
 * @author wangyong
 * @version v1.0
 * @create 2018-01-24 11:02
 **/
public class Log implements Serializable {
    private static final long serialVersionUID = 6727576030099416111L;
    @Id
    private Long id;

    private String username;

    @Column(name = "operate_time")
    private Date operateTime;

    private String type;

    private String module;

    private String uri;

    private String response;

    /**
     * 1=成功, 0=失败
     */
    private Integer success;

    @Column(name = "spend_millis")
    private Long spendMillis;

    private String ip;

    @Column(name = "create_time")
    private Date createTime;

    private String params;

    /**
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return username
     */
    public String getUsername() {
        return username;
    }

    /**
     * @param username
     */
    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    /**
     * @return operate_time
     */
    public Date getOperateTime() {
        return operateTime;
    }

    /**
     * @param operateTime
     */
    public void setOperateTime(Date operateTime) {
        this.operateTime = operateTime;
    }

    /**
     * @return type
     */
    public String getType() {
        return type;
    }

    /**
     * @param type
     */
    public void setType(String type) {
        this.type = type == null ? null : type.trim();
    }

    /**
     * @return module
     */
    public String getModule() {
        return module;
    }

    /**
     * @param module
     */
    public void setModule(String module) {
        this.module = module == null ? null : module.trim();
    }

    /**
     * @return uri
     */
    public String getUri() {
        return uri;
    }

    /**
     * @param uri
     */
    public void setUri(String uri) {
        this.uri = uri == null ? null : uri.trim();
    }

    /**
     * @return response
     */
    public String getResponse() {
        return response;
    }

    /**
     * @param response
     */
    public void setResponse(String response) {
        this.response = response == null ? null : response.trim();
    }

    /**
     * 获取1=成功, 0=失败
     *
     * @return success - 1=成功, 0=失败
     */
    public Integer getSuccess() {
        return success;
    }

    /**
     * 设置1=成功, 0=失败
     *
     * @param success 1=成功, 0=失败
     */
    public void setSuccess(Integer success) {
        this.success = success;
    }

    /**
     * @return spend_millis
     */
    public Long getSpendMillis() {
        return spendMillis;
    }

    /**
     * @param spendMillis
     */
    public void setSpendMillis(Long spendMillis) {
        this.spendMillis = spendMillis;
    }

    /**
     * @return ip
     */
    public String getIp() {
        return ip;
    }

    /**
     * @param ip
     */
    public void setIp(String ip) {
        this.ip = ip == null ? null : ip.trim();
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @return params
     */
    public String getParams() {
        return params;
    }

    /**
     * @param params
     */
    public void setParams(String params) {
        this.params = params == null ? null : params.trim();
    }
}